package com.pic.mgt.utils;

import java.text.DecimalFormat;
import java.text.NumberFormat;

public abstract class NumericUtils {
	private static NumberFormat numberTo_00000_formatter;
	
	static {
		numberTo_00000_formatter = new DecimalFormat("0000");
	}
	
	/**
	 * 驗證數字是否為正值(0也為正值)
	 * @param i
	 * @return
	 */
	public static boolean isPositive(int i) {
		boolean positive;
		if (i >= 0) {
			positive = true;
		}
		else {
			positive = false;
		}
		return positive;
	}
	
	public static String convertNumberTo_0000_String(int number) {
		return numberTo_00000_formatter.format(number);
	}
}
